import request from '@/utils/request'


export function getList(query) {
  return request({
    url: '/api/order/list',
    method: 'get',
    params: query
  })
}

export function stopOrder(id) {
  return request({
    url: '/api/order/stop',
    method: 'get',
    params: {
      id:id
    }
  })
}

export function refundService(id) {
  return request({
    url: '/api/order/refund_service',
    method: 'get',
    params: {
      id:id
    }
  })
}


export function refundNormal(id,fee) {
  return request({
    url: '/api/order/refund_normal',
    method: 'get',
    params: {
      id:id,
      fee:fee
    }
  })
}

export function getRefundList(order) {
  return request({
    url: '/api/order/refund_list',
    method: 'get',
    params:{
      number:order
    }
  })
}


export function refundBalance(id,fee) {
  return request({
    url: '/api/order/refund_balance',
    method: 'get',
    params: {
      id:id,
      fee:fee
    }
  })
}

export function getChart(query) {
  return request({
    url: '/api/order/get_chart',
    method: 'get',
    params:query
  })
}

export function cancelDraw(id) {
  return request({
    url: '/api/order/cancel_draw',
    method: 'get',
    params: {
      id:id
    }
  })
}

export function update(data) {
  return request({
    url: '/api/order/update',
    method: 'post',
    data
  })
}


export function change_planid(id,val) {
  return request({
    url: '/api/order/change_planid',
    method: 'get',
    params: {
      id: id,
      bd_userid: val
    }
  })
}

export function sendOcpc(id,type) {
  return request({
    url: '/api/order/sendOcpc',
    method: 'post',
    data: {
      id: id,
      type:type
    }
  })
}

export function batchOcpc(ids,type) {
  return request({
    url: '/api/order/batchOcpc',
    method: 'post',
    data: {
      ids: ids,
      type:type
    }
  })
}
